/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-9-24 下午3:46 Created by dwzhang
 */
package com.jade.bss.weixin.api.bonus.protocol;

import java.text.SimpleDateFormat;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.jade.bss.weixin.api.protocol.xml.Request;
import com.jade.framework.base.util.UniqueID;

/**
 * 发放现金红包接口。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-9-24 下午3:46
 */
@XmlRootElement (name = "xml")
@XmlAccessorType (XmlAccessType.FIELD)
public class SendRedPackRequest
        extends Request
{
    @XmlElement (name = "mch_billno")
    private String mchBillNo;
    @XmlElement (name = "send_name")
    private String sendName;
    @XmlElement (name = "re_openid")
    private String reOpenId;
    @XmlElement (name = "total_amount")
    private long totalAmount;
    @XmlElement (name = "total_num")
    private int totalNum = 1;
    @XmlElement (name = "wishing")
    private String wishing;
    @XmlElement (name = "client_ip")
    private String clientIp;
    @XmlElement (name = "act_name")
    private String actName;
    @XmlElement (name = "remark")
    private String remark;

    public String getMchBillNo()
    {
        return mchBillNo;
    }

    public void setMchBillNo(String mchBillNo)
    {
        this.mchBillNo = mchBillNo;
        putParam("mch_billno", mchBillNo);
    }

    public void setMchId(String mchId)
    {
        super.setMchId(mchId);
        SimpleDateFormat sf = new SimpleDateFormat("yyyyMMdd");
        mchBillNo = mchId + sf.format(new Date()) + UniqueID.nextCode(10);
        putParam("mch_billno", mchBillNo);
    }

    public String getSendName()
    {
        return sendName;
    }

    public void setSendName(String sendName)
    {
        this.sendName = sendName;
        putParam("send_name", sendName);
    }

    public String getReOpenId()
    {
        return reOpenId;
    }

    public void setReOpenId(String reOpenId)
    {
        this.reOpenId = reOpenId;
        putParam("re_openid", reOpenId);
    }

    public long getTotalAmount()
    {
        return totalAmount;
    }

    public void setTotalAmount(long totalAmount)
    {
        this.totalAmount = totalAmount;
        putParam("total_amount", totalAmount);
    }

    public int getTotalNum()
    {
        return totalNum;
    }

    public void setTotalNum(int totalNum)
    {
        this.totalNum = totalNum;
        putParam("total_num", totalNum);
    }

    public String getWishing()
    {
        return wishing;
    }

    public void setWishing(String wishing)
    {
        this.wishing = wishing;
        putParam("wishing", wishing);
    }

    public String getClientIp()
    {
        return clientIp;
    }

    public void setClientIp(String clientIp)
    {
        this.clientIp = clientIp;
        putParam("client_ip", clientIp);
    }

    public String getActName()
    {
        return actName;
    }

    public void setActName(String actName)
    {
        this.actName = actName;
        putParam("act_name", actName);
    }

    public String getRemark()
    {
        return remark;
    }

    public void setRemark(String remark)
    {
        this.remark = remark;
        putParam("remark", remark);
    }
}
